<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="typeList" item="vo"}
                <label for="row[type]-{$key}"><input id="row[type]-{$key}" name="row[type]" type="radio" value="{$key}" {in name="key" value="$row.type"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Max_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-max_count" data-rule="required" min="0" class="form-control" name="row[max_count]" type="number" value="{$row.max_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Per_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-per_count" data-rule="required" class="form-control" name="row[per_count]" type="number" value="{$row.per_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('At_least')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-at_least" data-rule="required" class="form-control" step="0.01" name="row[at_least]" type="number" value="{$row.at_least|htmlentities}">
        </div>
    </div>
    <div class="form-group {$row.type=='1'?'hide':''}">
        <label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount" data-rule="required" min="0" class="form-control" name="row[discount]" type="number" value="{$row.discount|htmlentities}">
        </div>
    </div>
    <div class="form-group {$row.type=='2'?'hide':''}">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money" data-rule="required" class="form-control" step="0.01" name="row[money]" type="number" value="{$row.money|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Receive_start_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-receive_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:00" data-use-current="true" name="row[receive_start_time]" type="text" value="{:$row.receive_start_time?datetime($row.receive_start_time):''}">
        </div>
        <div class="col-xs-12 col-sm-4">
            <input id="c-receive_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:59" data-use-current="true" name="row[receive_end_time]" type="text" value="{:$row.receive_end_time?datetime($row.receive_end_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Use_start_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-use_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:00" data-use-current="true" name="row[use_start_time]" type="text" value="{:$row.use_start_time?datetime($row.use_start_time):''}">
        </div>
        <div class="col-xs-12 col-sm-4">
            <input id="c-use_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:59" data-use-current="true" name="row[use_end_time]" type="text" value="{:$row.use_end_time?datetime($row.use_end_time):''}">
        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Freight_type')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--                        -->
<!--            <select  id="c-freight_type" data-rule="required" class="form-control selectpicker" name="row[freight_type]">-->
<!--                {foreach name="freightTypeList" item="vo"}-->
<!--                    <option value="{$key}" {in name="key" value="$row.freight_type"}selected{/in}>{$vo}</option>-->
<!--                {/foreach}-->
<!--            </select>-->

<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Range_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="rangeStatusList" item="vo"}
            <label for="row[range_status]-{$key}"><input id="row[range_status]-{$key}" name="row[range_status]" type="radio" value="{$key}" {in name="key" value="$row.range_status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>


    <div class="range-courses {$row.range_status==2?:'hide'}">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('商品选择')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <span><button type="button" class="btn btn-primary course-choose" ><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('')}</label>
            <div class="col-xs-12 col-sm-8">

                <table class="table">
                    <thead>
                    <tr>
                        <th style="text-align: left;width:20%">缩略图</th>
                        <th style="text-align: left;width:50%">名称</th>
                        <th style="text-align: left;width: 30%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="course" id="item"}
                    <tr>
                        <input type="hidden" name="course_ids[]" value="{$item.id}">
                        <td><img width="40px" src="{$item.thumb_image}" alt=""></td>
                        <td>{$item.name}</td>
                        <td><p><button type="button" class="btn btn-danger course_del"><i class="fa fa-trash"></i></button>
                            <button type="button" class="btn btn-warning course_detail" data-course_id="{$item.id}"><i class="fa fa-eye"></i></button></p></td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>

<!--                    <div class="row">-->
<!--                        <div class="col-sm-6 col-md-6" v-for="(item, index) in goods">-->

<!--                            <div class="thumbnail">-->
<!--                                <img src="http://file.shopro.top/uploads/20210519/46be61da737d99937df1917ff3c694a2.jpeg" alt="">-->
<!--                                <div class="caption">-->
<!--                                    <h6>{{item.name}} </h6>-->
<!--                                    &lt;!&ndash;                                <p>...</p >&ndash;&gt;-->
<!--                                    <input type="hidden" name="goods_ids[]" :value="item.id">-->
<!--                                    <p><button type="button" class="btn btn-danger" @click="del(index)"><i class="fa fa-trash"></i></button>-->
<!--                                        <a href="javascript:;" @click="detail(item.id)" class="btn btn-default" role="button">详情</a>-->
<!--                                    </p >-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
            </div>
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
